Image Texturing

Rayshade also supports an image texture. This texture allows you to use images to modify the characteristics of a surface. You can use three-channel images to modify the any or all of the ambient, diffuse, and specular colors of a surface. If you are using the Utah Raster Toolkit, you can also use single-channel images to modify surface reflectance, transparency, and the specular exponent. You can also use a single-channel image to apply a bump map to a surface.

In all but the bump-mapping case, a component is modified by multiplying the given value by the value computed by the texturing function. When using the Utah Raster Toolkit, surface characteristics are modified in proportion to the value of the alpha channel in the image. If there is no alpha channel, or you are not using the Utah Raster Toolkit, alpha is assumed to be everywhere equal to 1.

component <Component>
The named component will be modified.
Possible surface components are: ambient (modify ambient color), diffuse (modify diffuse color), specular (modify specular color), specpow, (modify specular exponent), reflect, (modify reflectivity), transp (modify transparency), bump, (modify surface normal). The specpow, reflect, transp, and bump components require the use of a single-channel image.

range high low
Specify the range of values to which the values in the image should be mapped. An value of 1 will be mapped high, 0 to low. Intermediate values will be linearly interpolated.

smooth
When given, pixel averaging will be performed in order to smooth the sampled image. If not specified, no averaging will occur.

textsurf <Surface Specification>
For use when modifying surface colors, this keyword specifies that the given surface should be used as the base to be modified when the alpha value in the image is non-zero. When alpha is zero, the object's unmodified default surface characteristics are retained.
The usual behavior is for the object's default surface properties to be used.

tile un vn
Specify how the image should be tiled (repeated) along the u and v axes. If positive, the value of un gives the number of times the image should be repeated along the u axis, starting from the origin of the texture, and positive vn gives the number of times it should be repeated along the v axis. If either value is zero, the image is repeated infinitely along the appropriate axis.
Tiling is usually only a concern when planar mapping is being used, though it may also be used if image textures are being scaled. By default un and vn are both zero.

A mapping function may also be associated with an image texture.